package com.example.smart2.ui;

import androidx.annotation.NonNull;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.MenuItem;
import android.widget.TextView;

import com.example.smart2.R;
import com.example.smart2.base.BaseActivity;
import com.example.smart2.model.PressModel;

import java.util.Objects;

public class PressDetailsActivity extends BaseActivity {

    private PressModel.RowsBean rowsBean;
    private TextView tvTitle;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_press_details);
        rowsBean=(PressModel.RowsBean) getIntent().getSerializableExtra("data");
//        getSupportActionBar().hide(); //隐藏标题栏
//        getSupportActionBar().setTitle("123");
//        getSupportActionBar().setDisplayHomeAsUpEnabled(true);

//        ActionBar actionBar=getSupportActionBar();//使标题居中显示
//        actionBar.setCustomView(R.layout.actionbar_title);
//        actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);


        setTitle("爱心捐赠",true);
    }

//    @Override
//    public boolean onOptionsItemSelected(MenuItem item) {
//        if (item.getItemId() == android.R.id.home) {
//            finish();// finish your activity
//        }
//        return super.onOptionsItemSelected(item);

//        switch (item.getItemId()) {
//            case android.R.id.home:
//                this.finish(); // back button
////                return true;
//        }
//        return super.onOptionsItemSelected(item);
//    }
}